home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / basic / ace24dist.lha / ace24.lha / include / resources / card.h < prev    next >
C/C++ Source or Header  |  1996-09-10  |  5KB  |  209 lines

  1. #ifndef RESOURCES_CARD_H
  2. #define RESOURCES_CARD_H 1
  3. /*
  4. ** card.h for ACE Basic
  5. **
  6. ** Note: Translated to ACE by ConvertC2ACE
  7. **       @ MapMeadow Software, Nils Sjoholm
  8. **
  9. **
  10. ** Date: 09/03/95
  11. **
  12. **
  13. */
  14.  
  15. /*
  16. ** This are the StructPointer defines for card.h
  17. */
  18. #ifndef CardHandlePtr
  19. #define CardHandlePtr ADDRESS
  20. #endif
  21. #ifndef CardMemoryMapPtr
  22. #define CardMemoryMapPtr ADDRESS
  23. #endif
  24. #ifndef DeviceTDataPtr
  25. #define DeviceTDataPtr ADDRESS
  26. #endif
  27. #ifndef TP_AmigaXIPPtr
  28. #define TP_AmigaXIPPtr ADDRESS
  29. #endif
  30. /*
  31. ** End of StructPointer defines for card.h
  32. */
  33.  
  34.  
  35. #ifndef EXEC_TYPES_H
  36. #include <exec/types.h>
  37. #endif
  38.  
  39. #ifndef EXEC_NODES_H
  40. #include <exec/nodes.h>
  41. #endif
  42.  
  43. #ifndef EXEC_INTERRUPTS_H
  44. #include <exec/interrupts.h>
  45. #endif
  46.  
  47. #define CARDRESNAME "card.resource"
  48.  
  49. /* Structures used by the card.resource             */
  50.  
  51. STRUCT  CardHandle  
  52.     Node cah_CardNode 
  53.     InterruptPtr  cah_CardRemoved 
  54.     InterruptPtr  cah_CardInserted 
  55.     InterruptPtr  cah_CardStatus 
  56.     BYTE    cah_CardFlags 
  57. END STRUCT 
  58.  
  59. STRUCT  DeviceTData  
  60.     LONGINT   dtd_DTsize  /* Size in bytes        */
  61.     LONGINT   dtd_DTspeed     /* Speed in nanoseconds     */
  62.     BYTE    dtd_DTtype  /* Type of card         */
  63.     BYTE    dtd_DTflags     /* Other flags          */
  64. END STRUCT 
  65.  
  66. STRUCT  CardMemoryMap  
  67.     ADDRESS   cmm_CommonMemory 
  68.     ADDRESS   cmm_AttributeMemory 
  69.     ADDRESS   cmm_IOMemory 
  70.  
  71. /* Extended for V39 - These are the size of the memory spaces above */
  72.  
  73.     LONGINT   cmm_CommonMemSize 
  74.     LONGINT   cmm_AttributeMemSize 
  75.     LONGINT   cmm_IOMemSize 
  76.  
  77. END STRUCT 
  78.  
  79. /* CardHandle.cah_CardFlags for OwnCard() function      */
  80.  
  81. #define CARDB_RESETREMOVE   0
  82. #define CARDF_RESETREMOVE   (1)
  83.  
  84. #define CARDB_IFAVAILABLE   1
  85. #define CARDF_IFAVAILABLE   (2)
  86.  
  87. #define CARDB_DELAYOWNERSHIP    2
  88. #define CARDF_DELAYOWNERSHIP    (4)
  89.  
  90. #define CARDB_POSTSTATUS    3
  91. #define CARDF_POSTSTATUS    (8)
  92.  
  93. /* ReleaseCreditCard() function flags               */
  94.  
  95. #define CARDB_REMOVEHANDLE  0
  96. #define CARDF_REMOVEHANDLE  (1)
  97.  
  98. /* ReadStatus() return flags                    */
  99.  
  100. #define CARD_STATUSB_CCDET      6
  101. #define CARD_STATUSF_CCDET      (64)
  102.  
  103. #define CARD_STATUSB_BVD1       5
  104. #define CARD_STATUSF_BVD1       (32)
  105.  
  106. #define CARD_STATUSB_SC         5
  107. #define CARD_STATUSF_SC         (32)
  108.  
  109. #define CARD_STATUSB_BVD2       4
  110. #define CARD_STATUSF_BVD2       (16)
  111.  
  112. #define CARD_STATUSB_DA         4
  113. #define CARD_STATUSF_DA         (16)
  114.  
  115. #define CARD_STATUSB_WR         3
  116. #define CARD_STATUSF_WR         (8)
  117.  
  118. #define CARD_STATUSB_BSY        2
  119. #define CARD_STATUSF_BSY        (4)
  120.  
  121. #define CARD_STATUSB_IRQ        2
  122. #define CARD_STATUSF_IRQ        (4)
  123.  
  124. /* CardProgramVoltage() defines */
  125.  
  126. #define CARD_VOLTAGE_0V     0   /* Set to default  may be the same as 5V */
  127. #define CARD_VOLTAGE_5V     1
  128. #define CARD_VOLTAGE_12V    2
  129.  
  130. /* CardMiscControl() defines */
  131.  
  132. #define CARD_ENABLEB_DIGAUDIO   1
  133. #define CARD_ENABLEF_DIGAUDIO   (2)
  134.  
  135. #define CARD_DISABLEB_WP    3
  136. #define CARD_DISABLEF_WP    (8)
  137.  
  138. /*
  139.  * New CardMiscControl() bits for V39 card.resource.  Use these bits to set, 
  140.  * or clear status change interrupts for BVD1/SC,  BVD2/DA,  and BSY/IRQ.
  141.  * Write-enable/protect change interrupts are always enabled.  The defaults
  142.  * are unchanged (BVD1/SC is enabled,  BVD2/DA is disabled,  and BSY/IRQ is enabled).
  143.  *
  144.  * IMPORTANT -- Only set these bits for V39 card.resource or greater (check
  145.  * resource base VERSION)
  146.  *
  147.  */
  148.  
  149. #define CARD_INTB_SETCLR    7
  150. #define CARD_INTF_SETCLR    (128)
  151.  
  152. #define CARD_INTB_BVD1      5
  153. #define CARD_INTF_BVD1      (32)
  154.  
  155. #define CARD_INTB_SC        5
  156. #define CARD_INTF_SC        (32)
  157.  
  158. #define CARD_INTB_BVD2      4
  159. #define CARD_INTF_BVD2      (16)
  160.  
  161. #define CARD_INTB_DA        4
  162. #define CARD_INTF_DA        (16)
  163.  
  164. #define CARD_INTB_BSY       2
  165. #define CARD_INTF_BSY       (4)
  166.  
  167. #define CARD_INTB_IRQ       2
  168. #define CARD_INTF_IRQ       (4)
  169.  
  170.  
  171. /* CardInterface() defines */
  172.  
  173. #define CARD_INTERFACE_AMIGA_0  0
  174.  
  175. /*
  176.  * Tuple for Amiga execute-in-place software (e.g.,  games,  or other
  177.  * such software which wants to use execute-in-place software stored
  178.  * on a credit-card,  such as a ROM card).
  179.  *
  180.  * See documentatin for IfAmigaXIP().
  181.  */
  182.  
  183. #define CISTPL_AMIGAXIP &H91
  184.  
  185. STRUCT  TP_AmigaXIP  
  186.     BYTE    TPL_CODE 
  187.     BYTE    TPL_LINK 
  188.     STRING TP_XIPLOC SIZE 4  
  189.     BYTE    TP_XIPFLAGS 
  190.     BYTE    TP_XIPRESRV 
  191. END STRUCT
  192. /*
  193.  
  194.       The XIPFLAGB_AUTORUN bit means that you want the machine
  195.       _to perform a reset if the execute-in-place card is inserted
  196.       after DOS has been started.  The machine will then reset, 
  197.       _and execute your execute-in-place code the next time around.
  198.      
  199.       NOTE -- this flag may be ignored on some machines,  in which
  200.       _case the user will have to manually reset the machine in the
  201.       usual way.
  202.  
  203. */
  204.  
  205. #define XIPFLAGSB_AUTORUN   0
  206. #define XIPFLAGSF_AUTORUN   (1)
  207.  
  208. #endif  /* RESOURCES_CARD_H */
  209.